<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| URI ROUTING
| -------------------------------------------------------------------------
| This file lets you re-map URI requests to specific controller functions.
|
| Typically there is a one-to-one relationship between a URL string
| and its corresponding controller class/method. The segments in a
| URL normally follow this pattern:
|
| 	www.your-site.com/class/method/id/
|
| In some instances, however, you may want to remap this relationship
| so that a different class/function is called than the one
| corresponding to the URL.
|
| Please see the user guide for complete details:
|
|	http://codeigniter.com/user_guide/general/routing.html
|
| -------------------------------------------------------------------------
| RESERVED ROUTES
| -------------------------------------------------------------------------
|
| There are two reserved routes:
|
|	$route['default_controller'] = 'welcome';
|
| This route indicates which controller class should be loaded if the
| URI contains no data. In the above example, the "welcome" class
| would be loaded.
|
|	$route['scaffolding_trigger'] = 'scaffolding';
|
| This route lets you set a "secret" word that will trigger the
| scaffolding feature for added security. Note: Scaffolding must be
| enabled in the controller in which you intend to use it.   The reserved 
| routes must come before any wildcard or regular expression routes.
|
*/

$route['default_controller'] = 'home';
$route['scaffolding_trigger'] = '';

// My custom rewrite rules
$route['home'] = 'home';
$route['rss'] = 'home/rss'; // global rss-feed
$route['test'] = 'test';
$route['portal'] = 'portal';
$route['admin'] = 'admin';
$route['im'] = 'home/im'; // for instant-messengers?
$route['login'] = 'mgmt/login'; // common login
// User spec.
$blogger_uri_regexp = '([a-zA-Z0-9_-]+)';
$route[$blogger_uri_regexp] = 'blogger/index/$1'; // Front page of a Blog
$route[$blogger_uri_regexp . '/page/(\d+)'] = 'blogger/index/$1/$2'; // Paging
$route[$blogger_uri_regexp . '/entry/(\S+)'] = 'blogger/entry/$1/$2'; // A single entry page, with comments
$route[$blogger_uri_regexp . '/category/(\S+)'] = 'blogger/category/$1/$2'; // List of entries under certain category
$route[$blogger_uri_regexp . '/archive/(\d{4})/(\d{1,2})'] = 'blogger/archive/$1/$2/$3'; // List of entries of one month
$route[$blogger_uri_regexp . '/tag/(\S+)'] = 'blogger/tag/$1/$2'; // List entries by Tags
$route[$blogger_uri_regexp . '/friend_login'] = 'blogger/friend_login/$1';
$route[$blogger_uri_regexp . '/leave_message'] = 'blogger/leave_message/$1';
$route[$blogger_uri_regexp . '/comments_list/(\S+)'] = 'blogger/comments_list/$1/$2'; // For ajaxy comments-listing
$route[$blogger_uri_regexp . '/comment/(\S+)'] = 'blogger/comment/$1/$2'; // For comments posting
$route[$blogger_uri_regexp . '/add_watch'] = 'blogger/add_watch/$1'; // Add to watch-list
$route[$blogger_uri_regexp . '/rss'] = 'blogger/rss/$1/0'; // RSS: Main
$route[$blogger_uri_regexp . '/rss/(\S+)'] = 'blogger/rss/$1/$2'; // RSS: One category
$route[$blogger_uri_regexp . '/rss_comment'] = 'blogger/rss_comment/$1'; // RSS of latest comments

$route[$blogger_uri_regexp . '/mgmt'] = 'mgmt/index/$1'; // Front page of back-end management
$route[$blogger_uri_regexp . '/mgmt/emotag/(\d+)'] = 'mgmt/emotag/$1/$2'; // Front page: emoTag list / post
$route[$blogger_uri_regexp . '/mgmt/login'] = 'mgmt/login/$1'; // User Login page
$route[$blogger_uri_regexp . '/mgmt/logout'] = 'mgmt/logout/$1'; // User Logout page
$route[$blogger_uri_regexp . '/mgmt/entries'] = 'mgmt/entries/$1'; // Entries list/batch management
$route[$blogger_uri_regexp . '/mgmt/entries_list/(\d{4})/(\d{1,2})'] = 'mgmt/entries_list/$1/$2/$3'; // Entries list/batch management
$route[$blogger_uri_regexp . '/mgmt/edit_entry'] = 'mgmt/edit_entry/$1/0'; // New entry
$route[$blogger_uri_regexp . '/mgmt/edit_entry/(\S+)'] = 'mgmt/edit_entry/$1/$2'; // Edit entry
$route[$blogger_uri_regexp . '/mgmt/comments'] = 'mgmt/comments/$1'; // Manage unauthed-comments, watch-list and latest comments...
$route[$blogger_uri_regexp . '/mgmt/comments_list/(\d{1})'] = 'mgmt/comments_list/$1/$2'; // Ajaxy listing of comments
$route[$blogger_uri_regexp . '/mgmt/watches_list'] = 'mgmt/watches_list/$1'; // Ajaxy listing of watches
$route[$blogger_uri_regexp . '/mgmt/categories'] = 'mgmt/categories/$1'; // Edit categories & tags
$route[$blogger_uri_regexp . '/mgmt/categories_list'] = 'mgmt/categories_list/$1'; // Ajaxy listing of categories
$route[$blogger_uri_regexp . '/mgmt/links'] = 'mgmt/links/$1'; // Edit links
$route[$blogger_uri_regexp . '/mgmt/links_list'] = 'mgmt/links_list/$1'; // Ajaxy listing of links
$route[$blogger_uri_regexp . '/mgmt/messages'] = 'mgmt/messages/$1'; // List private msgs
$route[$blogger_uri_regexp . '/mgmt/get_message/(\S+)'] = 'mgmt/get_message/$1/$2'; // View / reply a private msg
$route[$blogger_uri_regexp . '/mgmt/settings'] = 'mgmt/settings/$1'; // Personal settings
$route[$blogger_uri_regexp . '/mgmt/upload_avatar'] = 'mgmt/upload_avatar/$1'; // Personal settings
$route[$blogger_uri_regexp . '/mgmt/change_password_email'] = 'mgmt/change_password_email/$1'; // User changes password
$route[$blogger_uri_regexp . '/mgmt/delete_comment'] = 'mgmt/delete_comment/$1/'; // Delete single comment
$route[$blogger_uri_regexp . '/mgmt/upload_pix'] = 'mgmt/upload_pix/$1'; // Images/Data uploading
$route[$blogger_uri_regexp . '/mgmt/upload_pix_dnd'] = 'mgmt/upload_pix_dnd/$1'; // Images/Data uploading (Drag & Drop)
?>